package com.webchat.rmi.ugc;


import com.webchat.common.bean.APIResponseBean;
import com.webchat.domain.dto.payment.CallBackRequestBodyDTO;
import com.webchat.domain.dto.payment.PaymentResultDTO;
import com.webchat.rmi.interceptor.RpcRequestInterceptor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * UGC 服务支付回调处理的RPC客户端
 */
@FeignClient(name = "webchat-ugc-service",
        contextId = "paymentCallBackClient",
        configuration = RpcRequestInterceptor.class)
public interface UgcCallBackClient {


    /**
     * 支付服务回调
     *
     * @param callBackRequestBody
     * @return
     */
    @PostMapping("/ugc-service/callback/payment")
    APIResponseBean<Boolean> paymentCallBack(@RequestBody PaymentResultDTO callBackRequestBody);
}
